package head.first.model.state.demo1;

/**
 * Created by yiyongyao on 2018/2/27.
 *
 * 订单状态--已确认
 */
public class ConfirmedState extends OrderState {

    @Override
    void confirm(OrderContext orderContext) {
        orderContext.setState(this);
    }

    @Override
    void modify(OrderContext orderContext) {
        orderContext.setState(new OrderedState());
    }

    @Override
    void pay(OrderContext orderContext) {
        orderContext.setState(new LockedState());
    }

    @Override
    void dispalyState(OrderContext orderContext) {
        System.out.println("订单当前状态为====>已确认");
    }
}
